<template>
<view>
<view class="signin">
	<view class="signin_box">
		<view class="header">
			志愿服务签到计时
		</view>
		<view class="signin_boxcontent">
			<view style="display: inline;font-weight: 900;">我承诺</view>诚信参与志愿服务活动，签到签退所记录的志愿服务时长，为本人真实参与志愿服务活动所积累的时长。 
		</view>
		<view class="signin_boxcontent">
			<view style="display: inline;font-weight: 900;">我同意</view>公开我的志愿服务时长和记录等信息，以配合广大志愿者对诚信志愿的监督与核查。 
		</view>
		<view class="signin_boxcheckbox">
			<checkbox-group @change="checkboxChange()">
				<checkbox style="transform:scale(0.7);" color="#24CBA9" value ='0' :checked="checkboxs" /><text>我已阅读，并同意签到诚信协议</text>
			            <!-- <checkbox value ='0' :checked="checkboxs"    style="position: absolute; top: 0upx;left: 10upx;"> -->
			             <!-- </checkbox> -->
			            </checkbox-group>
			<!-- <label>
				<checkbox style="transform:scale(0.7);" color="#24CBA9" v-model="checkboxs"/><text>我已阅读，并同意签到诚信协议</text>
			</label> -->
		</view>
		<button  type="default" v-if="checkboxs"  class="signinbottons" @click="toDetail()">我要签到</button>
		<button  type="default" v-else  class="signinbotton">我要签到</button>
		
	</view>
	
</view>
</view>
</template>

<script>
var t = require("../../utils/request.js"),
    a = require("../../utils/util.js"),
    e = function (t) {
  return t && t.__esModule ? t : {
    default: t
  };
}(require("../../utils/api.js")),
    app = getApp(),
    o = e.default.departmentList,
    i = e.default.dictionaryCounty;

export default {
  data() {
    return {
		checkboxs:false,
    };
  },

  components: {},
  props: {},
  onLoad: function (t) {
    try {
			if (!app.globalData.zyzId) {
				uni.navigateTo({
				  url: "/pages/entry/login" 
				});
			}
      var a = uni.getStorageSync("areaId");
      console.log(a), this.setData({
        provinceId: a.p_id,
        cityId: a.c_id,
        countyId: a.d_id,
        level: a.level
      });
    } catch (t) {
      console.log(t);
    }
  },
  onReady: function () {},
  onShow: function () {},
  onHide: function () {},
  onUnload: function () {},
  onPullDownRefresh: function () {
  },
  onReachBottom: function () {
   
  },
  onShareAppMessage: function () {
    return {
      title: "让公益更生活 让生活更公益",
      path: "/pages/index/index",
      imageUrl: "/static/images/zyh_logo.jpg"
    };
  },
  methods: {
	 checkboxChange: function (e) {
		 if(this.checkboxs){
			 this.checkboxs=false
		 }else{
			 this.checkboxs=true
		 }
		 console.log(this.checkboxs)
	 },
    toDetail: function (t) {
      uni.navigateTo({
        url: "/pages/me/act/act" 
      });
	  // uni.navigateTo({
	  //   url: "/pages/org/detail?id=" + t.currentTarget.dataset.orgId
	  // })
    }
  }
};
</script>
<style lang="scss">
.signin{
	width: 100%;
	margin: 0rpx auto;
	height:100vh;
	background-color: rgba(36, 203, 169, 0.1);
	position: relative;
}
.signin_box{
	    position: absolute;
	    left: 50%;
	    top: 50%;
	    -webkit-transform: translate(-50%, -50%);
	    -ms-transform: translate(-50%, -50%);
	    transform: translate(-50%, -50%);
	    width: 18rem;
	    height: 25rem;
	    border-radius: 10px;
	    background-color: #fff;
	    border-radius: 10px;
	    overflow: hidden;
}
.signin_box .header {
    width: 100%;
    height: 10rem;
    background: url(../../static/images/back4.png) no-repeat center center;
    background-size: 100% 100%;
    text-align: center;
    font-size: .28rem;
    font-weight: bold;
    color: #fff;
    padding-top: 6.5rem;
    margin-bottom: .8rem;
}
.signin_boxcontent{
	padding: 5rpx 20px;
	text-indent: 2em;
	font-size: 28rpx;
}
.signin_boxcheckbox {
	padding: 30rpx 20rpx;
	font-size: 28rpx;
	    color: #333;
		text-align: center;
}
.signinbotton{
	    width: 10rem;
	    height: 1.6rem;
	    line-height: 1.6rem;
	    border-radius: .8rem;
	    text-align: center;
	    font-size: .32rem;
	    color: #fff;
	    background: #ddd;
	    border: none;
	    transition: all .33s ease;
}.signinbottons{
	    width: 10rem;
	    height: 1.6rem;
	    line-height: 1.6rem;
	    border-radius: .8rem;
	    text-align: center;
	    font-size: .32rem;
	    color: #fff;
	    background: #24CBA9;
	    border: none;
	    transition: all .33s ease;
}
.signin uni-checkbox .uni-checkbox-input {
    margin-right: 5px;
    -webkit-appearance: none;
    appearance: none;
    outline: 0;
    border: 1px solid rgb(36, 203, 169);
    background-color: #fff;
    border-radius: 3px;
    width: 22px;
    height: 22px;
    position: relative;
}
</style>